const formRows = [
  {
    span: 12,
    label: '服务网点类型',
    component: 'ASelect',
    prop: 'type',
    placeholder: '请选择服务网点类型',
    list: [{
        label: '知识产权保护工作站',
        value: '0'
      },
      {
        label: '知识产权纠纷人民调解委员会',
        value: '1'
      },
      {
        label: '知识产权保护中心',
        value: '2'
      },
      {
        label: '知识产权快速维权中心',
        value: '3'
      },
      {
        label: '国家知识产权信息公共服务备案网点',
        value: '4'
      },
      {
        label: '技术与创新支持中心(TISC)',
        value: '5'
      },
      {
        label: '商标品牌培育指导站',
        value: '6'
      }
    ]
  },
  {
    span: 24,
    label: '服务网点名称',
    component: 'AInput',
    placeholder: '请输入服务网点名称',
    prop: 'name',
    allowClear: true
  },
  {
    span: 24,
    label: '服务形象图',
    component: 'AUpload',
    prop: 'img' // 首图
  },
  {
    span: 24,
    label: '服务网点地址',
    component: 'AInput',
    placeholder: '请输入服务网点地址',
    prop: 'site',
    allowClear: true
  },
  {
    span: 24,
    label: '服务网点电话',
    component: 'AInput',
    placeholder: '请输入服务网点电话',
    prop: 'telephone',
    allowClear: true
  },
  {
    span: 24,
    label: '服务网点简介',
    component: 'RichTextEdit',
    prop: 'content'
  },
  {
    span: 24,
    label: '服务网点坐标经度',
    component: 'AInput',
    placeholder: '请输入服务网点坐标经度',
    prop: 'xpos',
    allowClear: true
  },
  {
    span: 24,
    label: '服务网点坐标纬度',
    component: 'AInput',
    placeholder: '请输入服务网点坐标纬度',
    prop: 'ypos',
    allowClear: true
  }
]

const formRules = {
  name: [{
      required: true,
      message: '标题不能为空',
      trigger: 'blur'
    },
    {
      min: 1,
      max: 100,
      message: '输入的字数不能超过100个',
      trigger: 'blur'
    }
  ],
  type: [{
    required: true,
    message: '服务网点类型不能为空',
    trigger: 'blur'
  }],
  content: [{
    required: true,
    message: '服务网点简介不能为空',
    trigger: ['blur']
  }],
  xpos: [{
    required: true,
    message: '服务网点坐标经度',
    trigger: ['blur']
  }],
  ypos: [{
    required: true,
    message: '服务网点坐标纬度不能为空',
    trigger: ['blur']
  }]
}

const formInfo = [{
    label: '标题',
    value: '-',
    key: 'title'
  },
  {
    label: '文章类型',
    value: '-',
    key: 'informationTypeStr'
  },

  {
    label: '发布日期',
    value: '-',
    key: 'publishTime'
  },
  {
    label: '首图',
    value: '-',
    key: 'picture',
    isVHtml: true
  },
  {
    label: '内容',
    value: '-',
    key: 'content',
    isVHtml: true
  },
  {
    label: '信息来源',
    value: '-',
    key: 'title'
  },
  {
    label: '附件',
    value: '-',
    key: 'annex',
    isVHtml: true
  }
]

module.exports = {
  formRows,
  formRules,
  formInfo
}